Skip to content

feat(mobile): bring GitLab and Bitbucket code review up to the GitHub workflow (part 2/2) - #6021

Open
iscekic wants to merge 4 commits into
kwf/bring-mobile-gitlab-and-bitb-3792-l1from
kwf/bring-mobile-gitlab-and-bitb-3792-l30
Open

feat(mobile): bring GitLab and Bitbucket code review up to the GitHub workflow (part 2/2)#6021
iscekic wants to merge 4 commits into
kwf/bring-mobile-gitlab-and-bitb-3792-l1from
kwf/bring-mobile-gitlab-and-bitb-3792-l30

Conversation

@iscekic

@iscekic iscekic commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Changelog for users

  • The review inbox and detail view now cover GitLab merge requests and Bitbucket pull requests: files, diffs, discussions, checks, and merges, in the provider's wording.
  • GitLab supports personal and organization contexts, including self-managed instances; Bitbucket Cloud is organization-only and explains that in a personal context.
  • New sessions select a repository and a branch per provider, the chosen branch reaches the real session checkout, and the Start action sits clear of the device navigation bar.
  • Leaving a new-session screen clears its organization scope, so reopening the repository picker never queries the previous organization's branches.
  • Recents, drafts, viewed-file sets, and pending comments stay separate across providers, owners, GitLab instances, and same-named repositories.
  • Merges and comments fence on the exact head and diff anchor, so a moved head or stale revision never redirects or misposts; auto-merge is an explicit capability, and Bitbucket explains its API has none.
  • A provider review opens on the pull/merge-request overview, and badges, pasted URLs, shared links, deep links, and recents open provider reviews in-app.
  • The inbox queries only connected providers; a revoked GitLab or Bitbucket connection shows that provider's own connection-expired notice with a working "Check connection" action, and one provider's failure leaves the other providers' rows visible.

Changelog for maintainers

  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/_layout.tsx:116 — accepted: index is registered ahead of the sheets, so the overview is the initial provider-review screen; a test runs the router's sorter to lock the order.
  • patches/expo-router@57.0.15.patch:1 — accepted: the patch again keeps ExpoRouterModule.kt; it now carries only the two JavaScript linking fixes, and the lockfile hash is updated.
  • apps/mobile/src/lib/pr-review/use-provider-inbox.ts:241 — accepted: GitHub reads now require the user's authorization; revoked access surfaces a reconnect action, and retries re-run the authorization check.
  • apps/mobile/src/app/(app)/agent-chat/repo-picker.tsx:201 — accepted: the Bitbucket organization-only note keys on personal context, not on a missing section, so an organization with no Bitbucket rows sees no note.
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx:163 — accepted: non-GitHub reconnect states render the shared provider reconnect notice with the provider's own title/message and a working "Check connection" CTA; GitHub keeps its centered empty state with an unconditional CTA, and a mounted test asserts the GitLab notice and CTA.
  • apps/mobile/src/lib/use-new-session-repos.ts:61 — accepted: the scope effect clears the published organization on unmount, so a remount issues no branch query until the next screen publishes its scope; resetNewSessionBranchScope returns the branch store to "not ready" and no-ops when already un-scoped, with store and hook tests.
  • Start at the provider review layout: it validates every route segment, publishes the provider scope (ref plus organization), and hosts the comment, review-submit, merge, and file-navigator sheets. One identity module and one URL resolver own provider identity, so malformed deep links never reach a query, and the GitLab instance hint stays display-only while the server re-derives the instance.
  • Viewed files, recents, and pending-review drafts key on the collision-free provider ref; GitHub keeps its legacy storage bytes and runs no migration. The new-session form drops the fixed pb-8 for a safe-area spacer from useDetailScreenBottomPadding, and the test pins the 60px clearance for the 44px mocked inset.

E2E proof

Proof is stack-wide on the current build. The new provider-reconnect and branch-scope runs are the current proof; they replace the superseded checks-loading frames, which are removed. The retained provider captures for the inline comment thread, the branch row, and the Bitbucket personal state stay valid. The recording has waits trimmed, and the change forks on no platform, so one device covers both.

scripted-shard1.mp4.trim.mp4
e1-gitlab-handoff.mp4.trim.mp4

[e2] ux-check: New session GitHub branch row + transcript images — prior/e2-load-img.png

[e1] needs:seed GitLab inline comment creates a real diff thread: from a seeded connected GitLab account, open PR Review, tap the open merge request, open Files, open a changed file, tap the line's… — prior/e1-expand-file.png

[e3] ux-check: Bitbucket in personal context: new-session Bitbucket card states organizations-only; opening a Bitbucket PR link shows the org-only explanation with no retry; selecting an organization… — prior/e3-personal-bitbucket-card.png

Owner request for the stack

Deliver the work described below as reviewed, CI-green pull requests assigned to @iscekic. Do not merge them. Prove the behaviour on a live build, not with mocks alone. Prefer an existing component, library, or contract over a new one. Do not weaken an existing permission, authorization, or access check. The only text size that matters is the default size. Do not test larger text or themes.

Bring mobile GitLab and Bitbucket up to the level of the existing GitHub workflows. Do not regress GitHub.

Support:

  • GitLab in Personal and organization contexts, including existing self-managed instances with their real host and full nested project path.
  • Bitbucket Cloud in organization context only, with an understandable state in Personal context.

The whole workflow, per provider:

  • Connect, and reach a usable workflow from the integration status entry point.
  • Discover and select a repository. Get the default branch from that provider. Select a branch.
  • Send the selected branch into the real session checkout, not only the payload.
  • Launch an agent with the existing managed server-side credentials.
  • Open an inbox and a detail view of pull or merge requests.
  • Show files, diffs, expanded context where supported, discussions, build or check state, and merge restrictions.
  • Comment, hold inline discussions, and take the supported review and merge actions.
  • Express auto-merge and review-status differences as explicit capabilities.
  • Open a session-linked review, a pasted URL, a shared link, a deep link, and a notification in the app.
  • Use the provider's own wording: pull request or merge request.

Identity rules:

  • Carry provider, owner, integration, instance, and repository identity through discovery, selection, pagination, and navigation.
  • Two same-named repositories must never cross a provider, owner, integration, or instance boundary.
  • A repository or owner change must drop an incompatible selected branch.
  • A stale revision or a moved head must never redirect a comment or a merge.
  • Caches, recents, drafts, pending comments, and retry keys must not collide across providers.
  • Derive credentials and host identity on the server. Never trust a client-supplied host or owner.
  • An unsupported action needs a clear explanation. Missing code is not a reason to call a requested feature unsupported.

Reuse one mobile presentation. Do not copy the GitHub screen tree per provider. Use disposable, authorized fixtures for merge and write evidence.

Verification protocol:

  • The current build's static gate is the only source of current failure truth. Run the static gate (surface typechecks plus the Vitest/Jest run over the changed and sibling test files) on the current tree first, repair its actual failures, and only then start fresh device verification.
  • A device-repair task may only be created from a device verdict produced against the current build; verdict files are archived before each round so a stored verdict never outlives the build it describes. The earlier vr3 and vr4 device-repair tasks are superseded: no device verifier ran in the 16:31 and 16:49 rounds, and their device-failure premise is void.
  • Changes made solely to work around obsolete device evidence are undone unless current evidence independently requires them. This removes vr4's uncommitted credential-service transport-retry workaround (git-token-service-request.ts, git-token-service-request.test.ts, and the user-token-client.ts / credential-broker-client.ts call-site changes). All legitimate provider work already delivered stays.
  • Historical evidence — the .toSorted failures, the Page-not-found state, and the credential-service outage — is not a current failure unless it reproduces on the current build.

This was referenced Sep 9, 2026
@kilo-code-bot

kilo-code-bot Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the two files changed since ddc9e514 found no new correctness, security, or performance issues: folding each GitLab diff page into the running counters is behavior-preserving and the added test covers the page-bound walk.

Files Reviewed (2 files)
  • apps/web/src/lib/provider-review/gitlab-read.ts
  • apps/web/src/lib/provider-review/gitlab-read.test.ts
Previous Review Summaries (5 snapshots, latest commit ddc9e51)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit ddc9e51)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the files changed since 1ae8ec22 found no new correctness, security, or performance issues in the changed code; the two earlier warnings remain addressed.

Files Reviewed (4 files)
  • apps/web/src/lib/provider-review/bitbucket-read.ts
  • apps/web/src/lib/provider-review/bitbucket-read.test.ts
  • apps/web/src/lib/provider-review/gitlab-read.ts
  • apps/web/src/lib/provider-review/gitlab-read.test.ts

Previous review (commit 1ae8ec2)

Status: No Issues Found | Recommendation: Merge

Executive Summary

Incremental review of the 8 files changed since e714694b confirms both prior warnings are fixed: non-GitHub provider reconnect states now render the shared reconnect notice with the provider's own title/message and a working recovery CTA, and the new-session branch scope is reset on unmount so a remount cannot query the previous organization. The bottom safe-area clearance and its test are sound. No new issues found in the changed code.

Files Reviewed (8 files)
  • apps/mobile/src/components/agents/new-session-configure-form.tsx
  • apps/mobile/src/components/agents/new-session-configure-form.test.ts
  • apps/mobile/src/components/agents/new-session-repository-state.ts
  • apps/mobile/src/components/agents/new-session-repository-state.test.ts
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx
  • apps/mobile/src/components/pr-review/full-surface-states.mounted.test.tsx
  • apps/mobile/src/lib/use-new-session-repos.ts
  • apps/mobile/src/lib/use-new-session-repos.test.ts

Previous review (commit e714694)

Status: 2 Issues Found | Recommendation: Address before merge

Executive Summary

Two provider-parity regressions remain on the current head: the shared overview still renders GitHub-only reconnect copy (with the recovery CTA removed) for GitLab/Bitbucket, and the new-session branch scope is published in a passive effect that is never reset, so a remount can query listRepositoryBranches under the previous organization. The four prior findings are fixed: index is registered ahead of the sheets, the expo-router patch no longer deletes ExpoRouterModule.kt, GitHub inbox reads are gated on authorization, and the Bitbucket note keys on personal context.

Overview

Severity Count
CRITICAL 0
WARNING 2
SUGGESTION 0
Issue Details (click to expand)

WARNING

File Line Issue
apps/mobile/src/components/pr-review/pr-review-overview.tsx 163 Provider reconnect state renders GitHub-only title/description and hides the recovery CTA
apps/mobile/src/lib/use-new-session-repos.ts 61 Branch scope published in a passive effect and never reset -> stale-organization branch query on remount
Files Reviewed (152 files: 91 source + 61 test; 87 generated i18n catalogs and the lockfile excluded)
  • apps/mobile/src/app/(app)/_layout.tsx
  • apps/mobile/src/app/(app)/agent-chat/branch-picker.tsx
  • apps/mobile/src/app/(app)/agent-chat/repo-picker.tsx
  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/_layout.tsx
  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/comment-composer.tsx
  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/file-navigator.tsx
  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/index.tsx
  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/merge.tsx
  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/review-submit.tsx
  • apps/mobile/src/components/agents/new-session-configure-form.tsx
  • apps/mobile/src/components/agents/new-session-repository-section.tsx
  • apps/mobile/src/components/agents/new-session-repository-state.ts
  • apps/mobile/src/components/agents/repository-branch-selector.tsx
  • apps/mobile/src/components/agents/session-detail-content.tsx
  • apps/mobile/src/components/agents/session-pr-badge.tsx
  • apps/mobile/src/components/agents/use-new-session-creator.ts
  • apps/mobile/src/components/picker-sheet.tsx
  • apps/mobile/src/components/pr-review/composer-inline-error.tsx
  • apps/mobile/src/components/pr-review/diff/diff-line.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-file-list-header.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-file-list.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-file-navigator.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-floating-actions.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-hunk-rows.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-side-by-side-row.tsx
  • apps/mobile/src/components/pr-review/diff/pr-diff-state-copy.ts
  • apps/mobile/src/components/pr-review/discussion/comment-row.tsx
  • apps/mobile/src/components/pr-review/discussion/discussion-thread.tsx
  • apps/mobile/src/components/pr-review/discussion/pr-review-discussion-list.tsx
  • apps/mobile/src/components/pr-review/discussion/reply-input.tsx
  • apps/mobile/src/components/pr-review/merge/pr-merge-section-parts.tsx
  • apps/mobile/src/components/pr-review/merge/pr-merge-section-provider.tsx
  • apps/mobile/src/components/pr-review/merge/pr-merge-sheet-parts.tsx
  • apps/mobile/src/components/pr-review/merge/pr-merge-sheet.tsx
  • apps/mobile/src/components/pr-review/pr-form-sheet-chrome.tsx
  • apps/mobile/src/components/pr-review/pr-review-capability-banner.tsx
  • apps/mobile/src/components/pr-review/pr-review-checks-section.tsx
  • apps/mobile/src/components/pr-review/pr-review-comment-composer-screen.tsx
  • apps/mobile/src/components/pr-review/pr-review-comment-composer.tsx
  • apps/mobile/src/components/pr-review/pr-review-connect-gate-view.ts
  • apps/mobile/src/components/pr-review/pr-review-connect-gate.tsx
  • apps/mobile/src/components/pr-review/pr-review-discussion-tab-view.ts
  • apps/mobile/src/components/pr-review/pr-review-discussion-tab.tsx
  • apps/mobile/src/components/pr-review/pr-review-entry-screen.tsx
  • apps/mobile/src/components/pr-review/pr-review-file-navigator-screen.tsx
  • apps/mobile/src/components/pr-review/pr-review-files-tab.tsx
  • apps/mobile/src/components/pr-review/pr-review-inbox-list.tsx
  • apps/mobile/src/components/pr-review/pr-review-merge-screen.tsx
  • apps/mobile/src/components/pr-review/pr-review-overview-parts.tsx
  • apps/mobile/src/components/pr-review/pr-review-overview.tsx
  • apps/mobile/src/components/pr-review/pr-review-provider-noun.ts
  • apps/mobile/src/components/pr-review/pr-review-provider-sheet-href.ts
  • apps/mobile/src/components/pr-review/pr-review-reconnect-notice.tsx
  • apps/mobile/src/components/pr-review/pr-review-review-submit-screen.tsx
  • apps/mobile/src/components/pr-review/pr-review-screen.tsx
  • apps/mobile/src/components/pr-review/pr-review-submit.tsx
  • apps/mobile/src/components/pr-review/pr-review-tab-selector.tsx
  • apps/mobile/src/components/pr-review/recent-pr-row-state.ts
  • apps/mobile/src/lib/picker-bridge.ts
  • apps/mobile/src/lib/pr-review/diff/pr-diff-list-bottom-padding.ts
  • apps/mobile/src/lib/pr-review/diff/pr-review-file-list-state.ts
  • apps/mobile/src/lib/pr-review/diff/use-pr-diff-context-loader.ts
  • apps/mobile/src/lib/pr-review/discussion/use-pr-review-discussion-threads.ts
  • apps/mobile/src/lib/pr-review/discussion/use-review-discussion-mutations.ts
  • apps/mobile/src/lib/pr-review/merge/use-pr-merge-mutations.ts
  • apps/mobile/src/lib/pr-review/mutation-error-display.ts
  • apps/mobile/src/lib/pr-review/pending-review-provider.tsx
  • apps/mobile/src/lib/pr-review/pr-link-paste.ts
  • apps/mobile/src/lib/pr-review/pr-review-connect-gate-view.ts
  • apps/mobile/src/lib/pr-review/provider-pr-queries.ts
  • apps/mobile/src/lib/pr-review/provider-pr-ref.ts
  • apps/mobile/src/lib/pr-review/provider-pr-url.ts
  • apps/mobile/src/lib/pr-review/recent-pr-row-state.ts
  • apps/mobile/src/lib/pr-review/recent-prs.ts
  • apps/mobile/src/lib/pr-review/use-check-provider-connection.ts
  • apps/mobile/src/lib/pr-review/use-pr-review-mutations.ts
  • apps/mobile/src/lib/pr-review/use-provider-inbox.test-helpers.ts
  • apps/mobile/src/lib/pr-review/use-provider-inbox.ts
  • apps/mobile/src/lib/pr-review/viewed-files.ts
  • apps/mobile/src/lib/route-registry.ts
  • apps/mobile/src/lib/session-pr-navigation.ts
  • apps/mobile/src/lib/universal-link-paths.js
  • apps/mobile/src/lib/use-new-session-repos.ts
  • apps/web/public/.well-known/apple-app-site-association
  • apps/web/src/lib/provider-review/bitbucket-read.ts
  • apps/web/src/lib/provider-review/gitlab-read.ts
  • packages/app-shared/src/universal-links/routes.ts
  • patches/expo-router@57.0.20.patch
  • tools/i18n/check-catalogs.mjs

Fix these issues in Kilo Cloud

Previous review (commit 2c804a5)

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 1
WARNING 2
SUGGESTION 1
Issue Details (click to expand)

CRITICAL

File Line Issue
apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/_layout.tsx 116 Provider stack never registers index

WARNING

File Line Issue
patches/expo-router@57.0.15.patch 1 Patch newly deletes ExpoRouterModule.kt
apps/mobile/src/lib/pr-review/use-provider-inbox.ts 241 GitHub inbox always queried when unconnected

SUGGESTION

File Line Issue
apps/mobile/src/app/(app)/agent-chat/repo-picker.tsx 201 Bitbucket org-only note keyed on section
Files Reviewed (4 files)
  • apps/mobile/src/app/(app)/pr-review/[platform]/[...identity]/_layout.tsx - 1 issue
  • patches/expo-router@57.0.15.patch - 1 issue
  • apps/mobile/src/lib/pr-review/use-provider-inbox.ts - 1 issue
  • apps/mobile/src/app/(app)/agent-chat/repo-picker.tsx - 1 issue

Fix these issues in Kilo Cloud

Previous review (commit 35421e1)

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • apps/mobile/src/lib/intl-cache-hermes-surface.test.ts

Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch kwf/bring-mobile-gitlab-and-bitb-3792-l1

@iscekic
iscekic marked this pull request as draft September 9, 2026 17:32
@iscekic iscekic changed the title feat(mobile): bring GitLab and Bitbucket pull request review to GitHub parity test(mobile): raise the Hermes Intl surface guard timeout to 30s (part 2/2) Sep 9, 2026
@iscekic
iscekic changed the base branch from kwf/bring-mobile-gitlab-and-bitb-3792-l29 to kwf/bring-mobile-gitlab-and-bitb-3792-l1 September 9, 2026 18:13
@iscekic
iscekic added this pull request to stack #6022 September 9, 2026 18:13
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from 35421e1 to fc000dc Compare September 9, 2026 18:58
@iscekic iscekic changed the title test(mobile): raise the Hermes Intl surface guard timeout to 30s (part 2/2) feat(mobile): bring GitLab and Bitbucket code review up to the GitHub workflow (part 2/2) Sep 9, 2026
iscekic added a commit that referenced this pull request Sep 10, 2026
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from 8d3940d to 2c804a5 Compare September 10, 2026 01:35
@iscekic
iscekic marked this pull request as ready for review September 10, 2026 01:49
Comment thread patches/expo-router@57.0.15.patch Outdated
Comment thread apps/mobile/src/lib/pr-review/use-provider-inbox.ts Outdated
Comment thread apps/mobile/src/app/(app)/agent-chat/repo-picker.tsx Outdated
@iscekic
iscekic marked this pull request as draft September 10, 2026 02:11
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from 2c804a5 to 7bc2d61 Compare September 12, 2026 14:32
iscekic added a commit that referenced this pull request Sep 12, 2026
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from 7bc2d61 to cd7d47c Compare September 12, 2026 22:20
iscekic added a commit that referenced this pull request Sep 12, 2026
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from cd7d47c to e714694 Compare September 12, 2026 23:19
@iscekic
iscekic marked this pull request as ready for review September 12, 2026 23:32
Comment thread apps/mobile/src/components/pr-review/pr-review-overview.tsx
Comment thread apps/mobile/src/lib/use-new-session-repos.ts
@iscekic
iscekic marked this pull request as draft September 13, 2026 00:37
iscekic added a commit that referenced this pull request Sep 13, 2026
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from e714694 to 54e2e17 Compare September 13, 2026 04:24
iscekic added a commit that referenced this pull request Sep 13, 2026
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from 54e2e17 to 1ae8ec2 Compare September 13, 2026 04:30
@iscekic
iscekic marked this pull request as ready for review September 13, 2026 04:53
@iscekic iscekic added the human-ready The PR is ready for human review. label Sep 13, 2026
@iscekic
iscekic requested a review from eshurakov September 13, 2026 05:18
@iscekic iscekic self-assigned this Sep 13, 2026
@iscekic
iscekic requested a review from pandemicsyn September 13, 2026 22:10
iscekic added a commit that referenced this pull request Sep 14, 2026
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from 1ae8ec2 to ddc9e51 Compare September 14, 2026 02:04
@iscekic
iscekic force-pushed the kwf/bring-mobile-gitlab-and-bitb-3792-l30 branch from ddc9e51 to 62c2de2 Compare September 14, 2026 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

human-ready The PR is ready for human review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants